home *** CD-ROM | disk | FTP | other *** search
- NAME
- top - repeatedly display system status
-
- SYNOPSYS
- top [-i] [-s seconds] [-w width] [-n nlines] [-r]
-
- DESCRIPTION
-
- "Top" is a program displays a periodically-updated picture of what's going
- on in your system.
-
- The display is a snapshot of system activity at periodic intervals. The top
- line of the display shows the number of milliseconds included in the
- interval, the percentage of that time counted by MiNT as "idle," the number
- of processes in the system, the number of running processes, and the total
- number of bytes used (the sum of the memory sizes of the processes listed).
-
- Below that each process in the system is listed, one process per line.
- The fields of this line have the following meanings:
-
- PID The process ID of this process.
-
- PPID The process ID of the parent of this process.
-
- PRI The process' base priority.
-
- CUR The process' current priority for adaptive scheduling.
-
- STATUS The run state of the process: Wait, Sleep, Run, Exit,
- TSR, and Stop. The Exit state means this process has
- terminated, but its parent has not received its exit code.
- The Run state includes the Ready state.
-
- SIZE The amount of memory allocated to this process.
-
- TIME The amount of time this process has run. This is the sum
- of the user and system times of the process, displayed as
- MM:SS.FF (minutes, seconds, and fraction of a second) or
- HH:MM:SS (hours, minutes, and seconds) if the process has
- run one hour or more.
-
- % The percentage of the time in this interval that this
- process accounted for.
-
- COMMAND The command this process is running.
-
- The number of processes displayed is limited by the number of lines on
- your screen, or the 'nlines' option, whichever is less.
-
- Either the PPID or the PRI and CURPRI will be displayed, not both. Toggle
- between these with the 'p' command (see below).
-
- OPTIONS
-
- -n nlines
- Set the maximum number of processes to display. This
- defaults to the length of your screen minus three for
- the status, input, and header lines.
-
- -r Sort processes in DECREASING order of PID. This (generally)
- puts more recent processes at the top.
-
- -s sleep
- Set the interval between updates to 'sleep' seconds.
- Default is 5.
-
- -w width
- Set the maximum width of a line to 'width'. The arguments
- in the COMMAND field will be truncated so the line is no
- more than 'width' characters long. The rest of the display
- (PID, STATUS, etc.) is not affected. Default is the width
- of your screen.
-
-
- COMMANDS WHILE RUNNING
-
- ? Help - a brief reminder of what commands are available.
-
- k Kill. Prompts for arguments to the "kill" command, which
- are PID's preceded by an optional signal number. "123 124"
- sends signal 15 (SIGTERM) to processes 123 and 124. "-1 123
- 124" sends signal 1 (SIGHUP) to them instead.
-
- n Prompts for the maximum number of processes to display
- (nlines). This can be smaller than your screen size, but
- not larger.
-
- p Toggle between displaying the PPID of each process and that
- process' PRI and CURPRI values.
-
- q Quit.
-
- r Renice. In response to the prompt, you should type in a
- "nice" delta value and one or more PID's. Those process'
- "nice" values will be changed by that delta.
-
- s Prompt for the number of seconds between intervals.
-
- w Prompt for the width; the width can be more than the screen
- width, in which case long argument lists will take up
- multiple lines.
-
- ^L (control-L) clear and repaint the display.
-
- NOTES
-
- This program uses curses and termcap. Appropriate environment variables
- must be set up. The screen width and height, and thus the wraparound point
- for wide lines and the maximum number of processes to display, are set at
- startup time.
-
- The "snapshot of your system" really is a snapshot: if things are moving
- too fast, you can get blur. If a process appears, runs, and exits during a
- single interval, top will never see it. Also, another strange-looking
- thing can happen. Let's say you know that process "A" will run, and after
- it exits process "B" will run. They may both appear on the same listing.
- Finally, the sum of the percentages might be greater than 100. All this is
- caused by strobe, roundoff, and nonzero shutter time effects.
-
- MiNT NOTES
-
- The Run state includes the Ready state: since top itself is always the
- running process when it gets a chance to check, having a separate name for
- it conveys no information and is distracting. So multiple processes
- appear to be "running."
-
- The COMMAND field is the concatenation of the "name" field of the process
- and the command-line arguments in the process' basepage. It can be wildly
- inaccurate if the process is using its basepage as its DTA for a directory
- search, or some other reason.
-
- Processes are shown in the order they arrived from the directory search. If
- there are more processes than lines on your screen (or your nlines value),
- you'll see the older, less-interesting ones and lose the newer-more
- interesting ones off the bottom. That's why you can reverse the search
- order.
-
- AUTHOR
-
- Top for MiNT was written in August, 1991 by Allan Pratt, Atari Corp.
- (atari!apratt). The idea for top came from the program of that name for
- BSD UNIX systems. (UNIX is a trademark of AT&T.) The source code is a
- hacked-over version of ps, written in March of 1991 by Tony Reynolds
- (cctony@sgisci1.ocis.olemiss.edu) and modified by Eric Smith (Mr. MiNT
- himself).
-
- TOP is placed unsupported in the public domain by Allan Pratt without let
- or hindrance. Please make the program and the source freely available.
- Share and enjoy.
-